package com.zhengyao.config;

import org.apache.dubbo.config.RegistryConfig;
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;


@Configuration
@EnableDubbo(scanBasePackages = "com.zhengyao")
public class DubboConfiguration {
    @Bean
    public RegistryConfig registryConfig(){
        RegistryConfig  registryConfig  = new RegistryConfig();
        registryConfig.setAddress("zookeeper://127.0.0.1:2181?timeout=10000");
        //registryConfig.setTimeout(10000);
        return   registryConfig;
    }
}
